Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Animation(val fileId: String, val fileUniqueId: String, val width: Int, val height: Int, val duration: Int, val thumbnail: PhotoSize? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null)

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

Link copied to clipboard
@Serializable
data class Audio(val fileId: String, val fileUniqueId: String, val duration: Int, val performer: String? = null, val title: String? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null, val thumbnail: PhotoSize? = null)

This object represents an audio file to be treated as music by the Telegram clients.

Link copied to clipboard
@Serializable
data class Document(val fileId: String, val fileUniqueId: String, val thumbnail: PhotoSize? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null)

This object represents a general file (as opposed to photos, voice messages and audio files).

Link copied to clipboard
@Serializable
data class File(val fileId: String, val fileUniqueId: String, val fileSize: Long? = null, val filePath: String? = null)

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.

Link copied to clipboard
@Serializable
sealed class InputMedia

This object represents the content of a media message to be sent. It should be one of

Link copied to clipboard
@Serializable
data class InputSticker(var sticker: ImplicitFile, val format: StickerFormat, val emojiList: List<String>, val maskPosition: MaskPosition? = null, val keywords: List<String>? = null)

This object describes a sticker to be added to a sticker set.

Link copied to clipboard
@Serializable
enum MaskPoint : Enum<MaskPoint>
Link copied to clipboard
@Serializable
data class MaskPosition(val point: MaskPoint, val xShift: Float, val yShift: Float, val scale: Float)

This object describes the position on faces where a mask should be placed by default.

Link copied to clipboard
@Serializable
data class PhotoSize(val fileId: String, val fileUniqueId: String, val width: Int, val height: Int, val fileSize: Int? = null)

This object represents one size of a photo or a file / sticker thumbnail.

Link copied to clipboard
@Serializable
data class Sticker(val fileId: String, val fileUniqueId: String, val type: StickerType, val width: Int, val height: Int, val isAnimated: Boolean, val isVideo: Boolean, val thumbnail: PhotoSize? = null, val emoji: String? = null, val setName: String? = null, val premiumAnimation: File? = null, val maskPosition: MaskPosition? = null, val customEmojiId: String? = null, val needsRepainting: Boolean? = null, val fileSize: Int? = null) : MultipleResponse

This object represents a sticker.

Link copied to clipboard
@Serializable
enum StickerFormat : Enum<StickerFormat>
Link copied to clipboard
@Serializable
data class StickerSet(val name: String, val title: String, val stickerType: StickerType, val stickers: List<Sticker>, val thumbnail: PhotoSize? = null)

This object represents a sticker set.

Link copied to clipboard
@Serializable
enum StickerType : Enum<StickerType>
Link copied to clipboard
@Serializable
data class Story(val id: Int, val chat: Chat)

This object represents a story.

Link copied to clipboard
@Serializable
data class Video(val fileId: String, val fileUniqueId: String, val width: Int, val height: Int, val duration: Int, val thumbnail: PhotoSize? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null)

This object represents a video file.

Link copied to clipboard
@Serializable
data class VideoChatEnded(val duration: Int)

This object represents a service message about a video chat ended in the chat.

Link copied to clipboard
@Serializable
data class VideoChatParticipantsInvited(val users: List<User>)

This object represents a service message about new members invited to a video chat.

Link copied to clipboard
@Serializable
data class VideoChatScheduled(val startDate: Instant)

This object represents a service message about a video chat scheduled in the chat.

Link copied to clipboard
@Serializable
data object VideoChatStarted
Link copied to clipboard
@Serializable
data class VideoNote(val fileId: String, val fileUniqueId: String, val length: Int, val duration: Int, val thumbnail: PhotoSize? = null, val fileSize: Int? = null)

This object represents a video message (available in Telegram apps as of v.4.0).

Link copied to clipboard
@Serializable
data class Voice(val fileId: String, val fileUniqueId: String, val duration: Int, val mimeType: String? = null, val fileSize: Long? = null)

This object represents a voice note.